package task1;

import java.util.Arrays;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 东莞呵呵
 * Date:2022-05-11
 * Time:20:11
 */
public class TestDemo8 {
    public static String myToString(int[] arr){
        String ret="[";
        for (int i = 0; i < arr.length; i++) {
            ret+=arr[i];
            if(i!=arr.length-1){
                ret+=", ";
            }

        }
        ret+="]";
        return ret;
    }
    public static void main(String[] args) {
        int[] arr={1,2,3,4,5};
        String ret=myToString(arr);
        System.out.println(ret);
    }
}
